<template>
    <n-config-provider
        :locale="zhCN"
        :date-locale="dateZhCN"
        :theme="systemStore.sysTheme ? darkTheme : null"
        :theme-overrides="
            systemStore.sysTheme ? darkThemeColor : lightThemeColor
        "
    >
        <slot />
    </n-config-provider>
</template>
<script setup>
import { NConfigProvider } from "naive-ui";
import { darkTheme } from "naive-ui";
import { zhCN, dateZhCN } from "naive-ui";
import { useSystemStore } from "@/store/system";

import { lightThemeColor, darkThemeColor } from "./theme";

const systemStore = useSystemStore();
</script>
